Fibonacci Subsequence

Fibonacci Subsequence

Music!!

Description

斐波那契序列${A}$满足:$A_i = A_{i - 1} + A_{i - 2}$
给出一个序列${C}$,求其中的最长斐波那契子序列

Format

Input

一个整数$N$,代表序列长度
$N$个数,第$i$个代表$C_i$

Output

一个整数,代表子序列的长度

Example

Input

1
2
10
1 1 3 -1 2 0 5 -1 -1 8

Output

1
5

Explanation

$1\,\,-1\,\,0\,\,-1\,\,-1$ 满足条件

Data

$10\%$:满足$N\,∈\,[1,\,100]$
$100\%$:$N <= 3000,\,abs(C_i)\,<=\,10^9$

等待填坑。。。。。。

Helping poor children in CSSYZ!!!